/**
 * 测试变长整型格式
 */
package com.tjh.hadoop.writable;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

import org.apache.hadoop.io.VIntWritable;
import org.junit.Test;

public class TestVIntWritable {
	/**
	 * 测试变长整数值，会根据数值范围，确定变长长度
	 */
	@Test
	public void test() throws Exception{
		byte[] data = new TestSerialize().serialize(new VIntWritable(163));
		assertThat(data.length, is(2));
	}
		
}
